package com.magenta.maxoptra.gis.distancematrix.commands;

import com.magenta.maxoptra.gis.distancematrix.GroupCommand;
import com.magenta.maxoptra.gis.distancematrix.GroupContext;

/**
 * @author Sergey Grachev
 */
abstract class AbstractGroupCommand implements GroupCommand {

    protected final long groupId;
    protected GroupContext groupContext;

    public AbstractGroupCommand(final long groupId) {
        this.groupId = groupId;
    }

    public long getGroupId() {
        return groupId;
    }

    @Override
    public void useGroupContext(final GroupContext groupContext) {
        this.groupContext = groupContext;
    }

    @Override
    public String toString() {
        return "AbstractGroupCommand{" +
                "groupId=" + groupId +
                '}';
    }
}
